
This guide assumes you've downloaded the below packages and the unRAID zip file from the lime-technology website, 
to a packages directory on your USB stick (eg. when logged into your unRAID instance, the packages would be in /boot/packages.
Packages you will need are:

bc
binutils
cpio
gcc
glibc
infozip
kernel-headers
make
ncurses
perl

For unRAID 5.0.5, use the Slackware 13.1 (non 64-bit) packages. 
You can find a list of all packages, and download them, from http://packages.slackware.com/. 
http://mirrors.slackware.com/slackware/slackware-13.1/slackware/
Open http://mirrors.slackware.com/slackware/slackware-13.1/slackware/PACKAGES.TXT 
to find each package location directory for downloading.
After downloaded above packages *.txz, copy to /boot/packages

Also check the patches directory for packages updated after the original release.
You will also need the unRAID zip file for the version of unRAID that you are using.



1. Get the kernel source for the version of unRAID you are running

Use uname command to find out what version of the linux kernel you are running, 
then download source from www.kernel.org - (Link to 3.x kernel sources)
(Replace 3.9.11 below with whatever version of the linux kernal that uname displays

# uname -a
# mkdir /boot/packages
# cd /boot/packages
# wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.9.11.tar.gz --no-check-certificate

2. extract tar and create a symbolic link

# tar -C /usr/src/ -zxvf /boot/packages/linux-3.9.11.tar.gz
# ln -sf /usr/src/linux-3.9.11 /usr/src/linux

3. Add unRAID mods to kernel source

# installpkg /boot/packages/infozip-6.0-i486-1.txz
# mkdir /mnt/dev
# unzip /boot/packages/unRAIDServer-5.0.5-i386.zip -d /mnt/dev/
# cp -rf /usr/src/linux-3.9.11p-unRAID/* /usr/src/linux/
# cp -f /usr/src/linux-3.9.11p-unRAID/.config /usr/src/linux/

//Install kernel headers
# installpkg /boot/packages/kernel-headers-2.6.33.4_smp-x86-1.txz

//Run make menuconfig after installing dependent packages
# installpkg /boot/packages/make-3.81-i486-1.txz
# installpkg /boot/packages/gcc-4.4.4-i486-1.txz
# installpkg /boot/packages/glibc-2.11.1-i486-8_slack13.1.txz
# installpkg /boot/packages/binutils-2.20.51.0.8-i486-1.txz
# installpkg /boot/packages/ncurses-5.7-i486-1.txz
# cd /usr/src/linux
# make clean
# make menuconfig

4. Include packages and any other kernel changes

# cp arcmsr* /usr/src/linux/drivers/scsi/arcmsr/

5. Build new bzimage, kernel and modules

# installpkg /boot/packages/perl-5.10.1-i486-2_slack13.1.txz
# installpkg /boot/packages/bc-1.06.95-i486-1.txz
# make bzImage
# make
# make modules
# make modules_install

6. Create new bzroot and copy both bzimage and bzroot to USB flash

# mkdir /mnt/dev/bz-mod
# cd /mnt/dev/bz-mod
# installpkg /boot/packages/cpio-2.9-i486-2.txz
# xzcat ../bzroot | cpio -m -i -d -H newc --no-absolute-filenames
# rsync -av --delete /lib/modules/3.9.11p-unRAID/ lib/modules/3.9.11p-unRAID/
# find . | cpio -o -H newc | xz --check=crc32 --x86 --lzma2=preset=9e > /boot/bzroot_new

//Copy bzimage_new
# cp /usr/src/linux-3.9.11/arch/x86/boot/bzImage /boot/bzimage_new

Lastly, you might like to update the syslinux.cfg file on your flash drive to either have the default option 
use these new bzimage_new and bzroot_new files, or create a new menu option and leave the existing one as is.

# echo 'label unRAID OS areca Raid driver' >> /boot/syslinux/syslinux.cfg
# echo '  kernel /bzimage_new' >> /boot/syslinux/syslinux.cfg
# echo '  append initrd=/bzroot_new' >> /boot/syslinux/syslinux.cfg
